<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="com.student.model.User"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!-- <!DOCTYPE html> -->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="https://fastly.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.38/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fastly.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.38/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<link href="https://fastly.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.38/examples/navbar/navbar.css" rel="stylesheet">
<script src="https://fastly.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.38/assets/js/ie-emulation-modes-warning.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/courseList.css"></link>
<title>在线选课系统-已选课程情况</title>
</head>
<body>
	<%
	User user = (User) request.getSession().getAttribute("info");
	%>
	<!-- 头部 -->
	<header>
		<div class="header">
			<div class="header-left">
				<img src="${ pageContext.request.contextPath }/images/selection.png"> 
				<span>在线选课系统</span>
			</div>
			<div class="header-right">
				<span>欢迎你，<%= user.getRealname() %></span> 
				<a href="${pageContext.request.contextPath}/ShowCourseServlet">课程总览</a> 
				<span>|</span>
				<a href="${ pageContext.request.contextPath }/view/teacher/courseList.jsp">已选课程情况</a>
				<span>|</span>
				<a href="${ pageContext.request.contextPath }/TeacherCourseServlet">我教的课</a>
				<span>|</span>
				<div class="logout">
					<a href="${ pageContext.request.contextPath }/LogoutServlet">安全退出</a>
					<img src="${ pageContext.request.contextPath }/images/logout.png">
				</div>
			</div>
		</div>
	</header>
	
	<!-- 表格 -->
	<div class="content">
		<div class="alert alert-info title" role="alert">
			<div>目前的已选课程情况如下</div>
			
		</div>

		
		<div class="table">
			<table class="table table-hover table-bordered" style="text-align:center">
			  <thead>
			    <tr>
			      <th scope="col">课程编号</th>
			      <th scope="col">课程名称</th>
			      <th scope="col">授课老师</th>
			      <th scope="col">学分</th>
			      <th scope="col">第一次上课时间</th>
			      <th scope="col">第二次上课时间</th>
			      <th scope="col">上课地点</th>
			      <th scope="col">限制人数</th>
			      <th scope="col">已选人数</th>
			    </tr>
			  </thead>
			  <tbody>
			  	<c:forEach items="${allSelectCourseList }" var="course">
			  		<tr>
				      <td scope="row">${course.course_id }</td>
				      <td>${course.course_name }</td>
				      <td>${course.teacher }</td>
				      <td>${course.point}</td>
				      <td>${course.time_1}</td>
				      <td>${course.time_2 }</td>
				      <td>${course.location }</td>
				      <td>${course.limited }</td>
				      <td>${course.num }</td>
				    </tr>
			  	</c:forEach>
			    
			  </tbody>
			</table>
		</div>
		
	</div>
	



</body>
</html>